Skip to content

Fix empty and root prefixes in PrefixFileSystem, glob, and StdFileSystem - #12198

Merged
lwwmanning merged 4 commits into
developfrom
wm/agy-io-deterministic-sim
Nov 30, 2026
Merged

lwwmanning merged 4 commits into
developfrom
wm/agy-io-deterministic-sim

Conversation

@lwwmanning

@lwwmanning lwwmanning commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

PrefixFileSystem::new previously turned an empty prefix into "/", prepending a stray leading slash to every delegated key; it now keeps "" empty while preserving "/" for explicit root prefixes, glob preserves a root "/" listing prefix for root-level absolute patterns, and StdFileSystem::list("") walks "." with the leading "." stripped so relative listings match head. Broader cross-binding glob normalization is tracked in #12302.

Assisted by Antigravity.

@lwwmanning lwwmanning added the changelog/fix A bug fix label Nov 27, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-29T18:26:29.842025Z 012c424 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@vortex-roborev-bot

vortex-roborev-bot Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

roborev: Combined Review (e283539)

Verdict: No findings match the comment filters.


Reviewers: claude-code | Synthesis: claude-code, 9s, ~$0.06 | Total: 58s, ~$0.34

vortex-roborev-bot[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

@lwwmanning lwwmanning left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Posted by Claude Opus 5.5 on Will's behalf.

I reviewed aa9859d. The PrefixFileSystem fix is correct, and replacing the sleep and yield_now waits in the vortex-io tests with deterministic stepping is worth having: SimulatedExecutor::drive alone has about 100 callers. The production changes outside prefix.rs keep their behaviour: default_read_ranges is the old trait default moved into a function, and the pool changes add only #[cfg(test)] fields and notifications.

At 2,952 added lines for a one-function fix, the harness is larger than its callers need. Three cuts would bring it closer to proportion without losing any of the deterministic tests:

  1. Drop the _test-harness feature and the pub mod. No other crate enables vortex-io/_test-harness or imports vortex_io::test_harness, although the module doc says it is for downstream crates. #[cfg(test)] mod test_harness with pub(crate) items is enough today, and a feature can be added when a second crate needs it.
  2. Remove the API that nothing calls. Outside the harness itself, nothing uses SimulatedExecutor::step, SimulatedExecutor::pending_task_count, either with_seed, complete_with, complete_last, cancelled_reads or ReadFault::ShortRead.
  3. Trim the harness self-tests. executor.rs and read_at.rs carry 9 tests of the test code, about 250 lines. Once the unused API is gone, keep only the ones that pin behaviour other tests depend on, such as the deterministic ordering for a seed and fault injection.

The new compat, StdFileSystem and SharedSegmentSource tests are outside what the title describes, but the description now gives the reason, so I would keep them.

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Addressed all three points in 71b3815:

  1. Dropped the _test-harness feature from vortex-io/Cargo.toml and changed test_harness to #[cfg(test)] mod test_harness; with pub(crate) items.
  2. Removed unused harness APIs (SimulatedExecutor::{step, pending_task_count, with_seed}, SimulatedReadAt::{with_seed, complete_with, complete_last, cancelled_reads}, ReadFault::ShortRead, and DeterministicRng::shuffle).
  3. Trimmed the harness self-tests from 9 to 3 focused tests (test_drive_panics_on_deadlock, test_fault_injection_transient_and_fatal, and test_seeded_poll_delays_produce_deterministic_order).

Updated the PR description to match.

devin-ai-integration[bot]

This comment was marked as resolved.

@codspeed

codspeed Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

Warning

vortex-data has exceeded the Hobby plan limit of 5 active contributors. Upgrade your plan or apply to the open source program by December 8, 2026 to keep using CodSpeed.

2 warnings

⚠️ Walltime results may be unreliable

Some benchmarks used the Walltime instrument outside CodSpeed Macro Runners, which can make the results inconsistent.

Learn more about Macro Runners

See affected benchmarks

⚠️ 1 benchmark is dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

✅ 2177 untouched benchmarks
⏩ 164 skipped benchmarks1


Comparing wm/agy-io-deterministic-sim (012c424) with develop (4525dfa)

Open in CodSpeed

Footnotes

  1. 164 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

@robert3005 robert3005 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found a local filesystem regression and an error path where the simulated reader panics.

— Codex (OpenAI)

Comment thread vortex-io/src/filesystem/prefix.rs Resolved
Comment thread vortex-io/src/test_harness/read_at.rs Resolved
devin-ai-integration[bot]

This comment was marked as resolved.

@robert3005 robert3005 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The updated code handles bare relative globs and returns UnexpectedEof for out-of-range simulated reads. One related absolute-path case remains.

— Codex (OpenAI)

Comment thread vortex-io/src/std_file/filesystem.rs Resolved
devin-ai-integration[bot]

This comment was marked as resolved.

@robert3005 robert3005 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

9872a5bf2 addresses my previous root-prefix finding. I found one more difference in the files selected by the new absolute-glob case.

— Codex (OpenAI)

Comment thread vortex-io/src/filesystem/glob.rs Resolved
@robert3005

Copy link
Copy Markdown
Contributor

This is a massive pr, I wonder if we can make it more reviewable. I wonder if we can somehow compress the harness test coverage and make sure they're minimal

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Compressed the harness and new test suites in d0ca2fdd6 while keeping behavior coverage intact:

  • Total diff: +2,810 / -282 -> +2,046 / -282 (-764 lines)
  • test_harness/: 1,038 -> 757 lines (dropped unused BlockingRuntime impl, ReadFault/transient queue, pin_project! wrapper, and folded self-tests)
  • compat/tests.rs: 683 -> 502 lines
  • std_file/filesystem.rs: +275 -> +149
  • segments/shared.rs: +263 -> +155
  • filesystem/prefix.rs: +238 -> +173

devin-ai-integration[bot]

This comment was marked as resolved.

@lwwmanning lwwmanning left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Posted by Claude Opus 5.5 on Will's behalf.

I reviewed 4430300 again for size, after the trim in d0ca2fd. The fix is correct, but the PR is still much larger than its problem.

The PrefixFileSystem and glob fix is about 32 production lines in prefix.rs, glob.rs and std_file/filesystem.rs. The runtime changes add about 50 more lines, mostly test-only join handles. The harness and tests add about 2,000 lines and remove about 220.

The largest single part is vortex-io/src/compat/tests.rs: 510 lines for 3 tests. Most of it is hand-written mocks of ObjectStore, FileSystem and the writer traits. The compat layer is not changed by this PR, and no test there covers the prefix fix. Please drop that file from this PR. That removes about a quarter of the added lines.

The rest is in proportion. The harness replaces 171 lines of hand-rolled mocks in segments/file.rs, and the SharedSegmentSource tests show what it is for. The fix itself gets focused tests in prefix.rs, glob.rs and std_file/filesystem.rs.

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Dropped vortex-io/src/compat/tests.rs (and the SimulatedReadAt helpers only it used) in 5f2852d4f, bringing the diff down to +1,528 / -282 across 15 files.

devin-ai-integration[bot]

This comment was marked as resolved.

Signed-off-by: Will Manning <will@willmanning.io>
@lwwmanning
lwwmanning force-pushed the wm/agy-io-deterministic-sim branch from 5f2852d to 012c424 Compare November 29, 2026 18:22
@lwwmanning lwwmanning changed the title Fix empty PrefixFileSystem prefix and add deterministic IO test harness Fix empty and root prefixes in PrefixFileSystem, glob, and StdFileSystem Nov 29, 2026
@lwwmanning

Copy link
Copy Markdown
Contributor Author

Trimmed this PR down to just the 3-file empty/root prefix fix (prefix.rs, glob.rs, std_file/filesystem.rs) and their focused regression tests in 012c42414c, removing SimulatedExecutor and the unrelated IO test harness/suites per @robert3005's feedback.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

@robert3005 robert3005 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The glob separator behavior has a follow-up in #12302. The filesystem-root regression still applies at this head. With StdFileSystem::with_prefix("/"), head("data/file") now looks under the working directory. An explicit / needs to keep resolving from the filesystem root, while with_prefix("") should keep relative paths relative. A recording filesystem could check the exact delegated keys for both prefixes without depending on the host filesystem. Existing root-prefix thread

The replacement commit 012c42414c has a matching human author and sign-off, so the earlier DCO comment is addressed.

— Codex (OpenAI)

@robert3005

Copy link
Copy Markdown
Contributor

trim the tests otherwise 👍

Signed-off-by: Will Manning <will@spiraldb.com>
Co-Authored-By: Will Manning <will@spiraldb.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor

Fixed the "/" root-prefix regression and trimmed the tests across all 3 files in 0eec121f3 (+375/-8 -> +233/-8).

devin-ai-integration[bot]

This comment was marked as resolved.

Signed-off-by: Will Manning <will@spiraldb.com>
Co-Authored-By: Will Manning <will@spiraldb.com>
devin-ai-integration[bot]

This comment was marked as resolved.

Signed-off-by: Will Manning <will@spiraldb.com>
Co-Authored-By: Will Manning <will@spiraldb.com>
@lwwmanning
lwwmanning added this pull request to the merge queue Nov 30, 2026
Merged via the queue into develop with commit ad6618d Nov 30, 2026
57 checks passed
@lwwmanning
lwwmanning deleted the wm/agy-io-deterministic-sim branch November 30, 2026 00:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/fix A bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants